// 模拟数据，用于替代网络请求
export const mockNewsData = {
  result: [
    {
      id: 1,
      title: "技术新闻 1",
      content: "这是一条模拟的技术新闻内容",
      date: "2024-01-01",
    },
    {
      id: 2,
      title: "技术新闻 2",
      content: "这是另一条模拟的技术新闻内容",
      date: "2024-01-02",
    },
  ],
};

export const mockWeatherData = {
  data: {
    city: "北京",
    temperature: "22°C",
    weather: "晴天",
    humidity: "65%",
  },
};

// 模拟网络请求的延迟
export const simulateNetworkDelay = (data, delay = 500) => {
  return new Promise((resolve) => {
    setTimeout(() => {
      resolve(data);
    }, delay);
  });
};
